package com.team2.outpatient_sys.service.impl;

import com.team2.outpatient_sys.dao.CaseHistoryDao;
import com.team2.outpatient_sys.pojo.CaseHistory;
import com.team2.outpatient_sys.service.CaseHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CaseHistoryServiceImpl implements CaseHistoryService {
    @Autowired
    private CaseHistoryDao caseHistoryDao;
    @Override
    public List<CaseHistory> searchCaseHistory(int patientId) {
        return caseHistoryDao.searchCaseHistory(patientId);
    }

    @Override
    public int add(CaseHistory caseHistory) {
        return caseHistoryDao.add(caseHistory);
    }
}
